#include <bits/stdc++.h>
using namespace std;

int main()
{
	unsigned long long n, rev;
	cin >> n >> rev;
	unsigned long long num = pow(26, n); 
	unsigned long long rel = num - (rev % (num + 1));
	for(unsigned long long i = 1; i <= n; i++){
		unsigned long long t = rel / pow(26, n - i);
		cout << char(t + 'a');
		rel = rel - t * pow(26, n - i);
	}
	return 0;
}
